package com.wgchao.amc.service;

import com.wgchao.amc.common.PageData;
import com.wgchao.amc.common.ResultCommon;
import com.wgchao.amc.mapstruct.dto.SysBaseGroupDTO;
import com.wgchao.amc.mapstruct.dto.SysBaseRoleDTO;
import com.wgchao.amc.mapstruct.dto.SysBaseUserDTO;

import javax.servlet.http.HttpSession;
import java.util.List;

public interface UserService {

    public ResultCommon<SysBaseUserDTO> save(SysBaseUserDTO userDTO, Long userId) throws Exception;

    public ResultCommon<SysBaseUserDTO> search(Long userId) throws Exception;

    public ResultCommon<List<SysBaseUserDTO>> searchOfAgency(String agencyCode) throws Exception;

    public ResultCommon<PageData<SysBaseUserDTO>> page(int page, int limit, Boolean cancel, Boolean del, String agencyCode,
                                                       String userName) throws Exception;

    public ResultCommon<SysBaseUserDTO> update(SysBaseUserDTO userDTO, Long userId) throws Exception;

    public ResultCommon deletes(List<Long> userIds, Long userId) throws Exception;

    public ResultCommon cancel(Long userId, boolean status, Long auserId) throws Exception;


    /****************************************************/
    public ResultCommon<SysBaseUserDTO> assignedGroup(Long userId, List<SysBaseGroupDTO> groupDTOS) throws Exception;

    public ResultCommon<SysBaseUserDTO> assignedRoles(Long userId, Long groupId, List<SysBaseRoleDTO> roleDTOS) throws Exception;


    public ResultCommon<String> in(String uname, String password) throws Exception;

}
